import request from "../service/request";

export function getHttp(url: string, params = {}, headers = {}) {
  return request({
    url,
    method: "get",
    params: params,
    headers: headers,
  });
}

export function postHttp(url: string, data = {}, headers = {}) {
  return request({
    url,
    method: "post",
    data: data,
    headers: headers
  });
}


export function postHttpParam(url: string, params = {}, headers = {}) {
  return request({
    url,
    method: "post",
    params: params,
    headers: headers
  });
}

export function putHttp(url: string, data = {}, headers = {}) {
  return request({
    url,
    method: "put",
    data: data,
    headers: headers,
  });
}

export function postHttpMulti(url: string, data = {}, headers = {}) {
  return request({
    url,
    method: "post",
    data: data,
    headers: {
      ...headers,
      "Content-Type": "multipart/form-data",
    },
  });
}
